var person={
    weight:56,
    height:180,
    name:"zhangsan",
}
// 1.对象字面量--创建一个对象
var obj={
    name:"zhangsan",
    age:12,
    sayName:function(){
        console.log('my name is',this.name);
    }
}
// console.log(obj);
console.log(obj.sayName,'访问对象属性');
obj.sayName();
// 2.使用构造函数创建对象
var obj1=new Object();//等价于 var obj1={};
obj1.name='lisi';
obj1.age=18;
obj1.sayAge=function(){
    console.log('my age is',this.age,'obj1.age');
};
console.log(obj1);
obj1.sayAge();
console.log(obj1.sayAge);